import body from '@/components/body'
import childView from '@/components/appMain.vue'

const configRouter = {
  path: '/config',
  component: body,
  iconCls: 'icon-setting',
  name: '配置',//
  meta: {
    isLink: true
  },
  children: [
    {
      path: '/siteConfig',
      isParent: true,
      name: '站点设置',//站点设置
      component: resolve => {
        require(['@/views/config/siteConfig/edit.vue'], resolve)
      },
    },
    {
      path: '/stat',
      name: '统计设置',//统计设置
      component: childView, isParent: true,
      redirect: '/stat/list',
      children: [
        {
          path: '/stat/list',
          name: '统计列表',//统计列表
          component: resolve => {
            require(['@/views/config/stat/list.vue'], resolve)
          },
        },
        {
          path: '/stat/add',
          name: '统计添加',//统计添加
          component: resolve => {
            require(['@/views/config/stat/edit.vue'], resolve)
          },
        },
        {
          path: '/stat/edit',
          name: '统计修改',//统计修改
          component: resolve => {
            require(['@/views/config/stat/edit.vue'], resolve)
          },
        }
      ]
    },
    {
      path: '/ftp',
      name: 'FTP管理',//ftp管理
      component: childView, isParent: true,
      redirect: '/ftp/list',
      children: [
        {
          path: '/ftp/list',
          name: 'FTP列表',//ftp管理列表
          component: resolve => {
            require(['@/views/config/ftp/list.vue'], resolve)
          },
        }, {
          path: '/ftp/add',
          name: 'FTP添加',//ftp管理添加
          component: resolve => {
            require(['@/views/config/ftp/edit.vue'], resolve)
          },
        }, {
          path: '/ftp/edit',
          name: 'FTP修改',//ftp管理修改
          component: resolve => {
            require(['@/views/config/ftp/edit.vue'], resolve)
          },
        }
      ]
    },
    {
      path: '/oss',
      name: 'OSS管理',//oss管理
      component: childView, isParent: true,
      redirect: '/oss/list',
      children: [
        {
          path: '/oss/list',
          name: 'OSS列表',//oss管理列表
          component: resolve => {
            require(['@/views/config/oss/list.vue'], resolve)
          },
        },
        {
          path: '/oss/add',
          name: 'OSS添加',//oss管理添加
          component: resolve => {
            require(['@/views/config/oss/edit.vue'], resolve)
          },
        },
        {
          path: '/oss/edit',
          name: 'OSS修改',//oss管理修改
          component: resolve => {
            require(['@/views/config/oss/edit.vue'], resolve)
          },
        }
      ]
    },
    {
      path: '/type',
      name: '内容类型',//内容类型
      component: childView, isParent: true,
      redirect: '/type/list',
      children: [
        {
          path: '/type/list',
          name: '内容类型列表',//内容类型列表
          component: resolve => {
            require(['@/views/config/type/list.vue'], resolve)
          },
        },
        {
          path: '/type/add',
          name: '内容类型添加',//内容类型添加
          component: resolve => {
            require(['@/views/config/type/edit.vue'], resolve)
          },
        },
        {
          path: '/type/edit',
          name: '内容类型修改',//内容类型修改
          component: resolve => {
            require(['@/views/config/type/edit.vue'], resolve)
          },
        }
      ]
    },
    /*    {
          path: '/directive',
          name: '标签向导',//标签向导
          component: childView, isParent: true,
          redirect: '/directive/list',
          children: [
            {
              path: '/directive/list',
              name: '标签向导列表',//标签向导列表
              component: resolve => { require(['@/views/config/directive/list.vue'], resolve) },
            },
            {
              path: '/directive/add',
              name: '标签向导添加',//标签向导添加
              component: resolve => { require(['@/views/config/directive/add.vue'], resolve) },
            },
          ]
        },*/
    {
      path: '/model',
      name: '模型管理',//模型管理
      component: childView,
      isParent: true,
      redirect: '/model/list',
      children: [{
        path: '/model/list',
        name: '模型列表',//模型管理列表
        component: resolve => {
          require(['@/views/config/model/list.vue'], resolve)
        },
      }, {
        path: '/model/add',
        name: '模型添加',//模型管理添加
        component: resolve => {
          require(['@/views/config/model/edit.vue'], resolve)
        },
      }, {
        path: '/model/edit',
        name: '模型修改',//模型管理修改
        component: resolve => {
          require(['@/views/config/model/edit.vue'], resolve)
        },
      },
        {
          path: '/channelModel/list',
          name: '栏目模型字段列表',//栏目模型
          component: resolve => {
            require(['@/views/config/model/item/channel/list.vue'], resolve)
          }
        },
        {
          path: '/channelModel/update',
          name: '栏目模型字段修改',//栏目模型项修改
          component: resolve => {
            require(['@/views/config/model/item/channel/edit.vue'], resolve)
          }
        },
        {
          path: '/channelModel/save',
          name: '栏目模型字段添加',//栏目模型项添加
          component: resolve => {
            require(['@/views/config/model/item/channel/edit.vue'], resolve)
          }
        },
        {
          path: '/contentModel/list',
          name: '内容模型字段模型',//内容模型
          component: resolve => {
            require(['@/views/config/model/item/content/list.vue'], resolve)
          }
        },
        {
          path: '/contentModel/update',
          name: '内容模型字段修改',//内容模型项修改
          component: resolve => {
            require(['@/views/config/model/item/content/edit.vue'], resolve)
          }
        },
        {
          path: '/contentModel/save',
          name: '内容模型字段添加',//内容模型项添加
          component: resolve => {
            require(['@/views/config/model/item/content/edit.vue'], resolve)
          }
        }
      ]
    },
    {
      path: '/globel',
      name: '全局设置',//全局设置
      component: childView,
      children: [
        {
          path: '/globel/systemUpdate',
          name: '系统设置',//全局设置-系统设置
          component: resolve => {
            require(['@/views/config/config/systemUpdate.vue'], resolve)
          },
        },
        {
          path: '/globel/loginUpdate',
          name: '登录设置',//全局设置-登录设置
          component: resolve => {
            require(['@/views/config/config/loginUpdate.vue'], resolve)
          },
        },
        {
          path: '/globel/memberUpdate',
          name: '用户设置',//全局设置-用户设置
          component: resolve => {
            require(['@/views/config/config/memberUpdate.vue'], resolve)
          },
        },
        {
          path: '/globel/registerModel',
          name: '用户注册管理',//全局设置-用户注册管理
          component: childView,
          redirect: '/globel/registerModel/list',
          children: [{
            path: '/globel/registerModel/list',
            name: '用户注册列表',//全局设置-用户注册管理列表
            component: resolve => {
              require(['@/views/config/config/memberRegister/list.vue'], resolve)
            },
          },
            {
              path: '/globel/registerModel/add',
              name: '用户注册添加',//全局设置-用户注册管理添加
              component: resolve => {
                require(['@/views/config/config/memberRegister/edit.vue'], resolve)
              },
            },
            {
              path: '/globel/registerModel/edit',
              name: '用户注册修改',//全局设置-用户注册管理修改
              component: resolve => {
                require(['@/views/config/config/memberRegister/edit.vue'], resolve)
              },
            }
          ]
        },
        {
          path: '/globel/markUpdate',
          name: '水印设置',//全局设置-水印设置
          component: resolve => {
            require(['@/views/config/config/markUpdate.vue'], resolve)
          },
        },
        {
          path: '/globel/firewallUpdate',
          name: '防火墙设置',//全局设置-防火墙设置
          component: resolve => {
            require(['@/views/config/config/firewallUpdate.vue'], resolve)
          },
        },
        {
          path: '/globel/attrUpdate',
          name: '其他设置',//全局设置-其他设置
          component: resolve => {
            require(['@/views/config/config/attrUpdate.vue'], resolve)
          },
        },
        {
          path: '/globel/companyUpdate',
          name: '机构信息设置',//全局设置-机构信息设置
          component: resolve => {
            require(['@/views/config/config/companyUpdate.vue'], resolve)
          },
        },
        {
          path: '/globel/contentUpdate',
          name: '内容佣金设置',//全局设置-内容佣金设置
          component: resolve => {
            require(['@/views/config/config/contentUpdate.vue'], resolve)
          },
        },
      ]
    },
    {
      path: '/site',
      component: childView, isParent: true,
      name: '站点管理',//站点管理
      redirect: '/site/list',
      children: [
        {
          path: '/site/list',
          name: '站点列表',//站点管理列表
          component: resolve => {
            require(['@/views/config/site/list.vue'], resolve)
          },
        },
        {
          path: '/site/add',
          name: '站点添加',//站点管理添加
          component: resolve => {
            require(['@/views/config/site/add.vue'], resolve)
          },
        },
        {
          path: '/site/edit',
          name: '站点修改',//站点管理修改
          component: resolve => {
            require(['@/views/config/site/list.vue'], resolve)
          },
        }
      ]
    },
    {
      path: '/apiManage',
      name: '接口管理',//接口管理
      component: childView,
      children: [
        {
          path: '/apiManage/apiUpdate',
          name: '接口设置',//接口管理-接口设置
          component: resolve => {
            require(['@/views/config/apiManage/apiUpdate.vue'], resolve)
          },
        },
        {
          path: '/apiManage/apiSSOupdate',
          name: '单点登录设置',//接口管理-sso设置
          component: resolve => {
            require(['@/views/config/apiManage/ssoManage.vue'], resolve)
          },
        },
        {
          path: '/apiManage/apiMan',
          name: '接口管理',//接口管理-接口管理
          component: childView,
          redirect: '/apiManage/apiMan/list',
          children: [{
            path: '/apiManage/apiMan/list',
            name: '接口列表',//接口管理-接口管理列表
            component: resolve => {
              require(['@/views/config/apiManage/apiMan/list.vue'], resolve)
            },
          }, {
            path: '/apiManage/apiMan/add',
            name: '接口添加',//接口管理-接口管理添加
            component: resolve => {
              require(['@/views/config/apiManage/apiMan/edit.vue'], resolve)
            },
          }, {
            path: '/apiManage/apiMan/edit',
            name: '接口修改',//接口管理-接口管理修改
            component: resolve => {
              require(['@/views/config/apiManage/apiMan/edit.vue'], resolve)
            },
          }]
        },
        {
          path: '/apiManage/apiUserMan',
          name: '接口用户管理',//接口管理-接口用户管理
          component: childView,
          redirect: '/apiManage/apiUserMan/list',
          children: [{
            path: '/apiManage/apiUserMan/list',
            name: '接口用户列表',//接口管理-接口用户管理列表
            component: resolve => {
              require(['@/views/config/apiManage/apiUserMan/list.vue'], resolve)
            },
          }, {
            path: '/apiManage/apiUserMan/add',
            name: '接口用户添加',//接口管理-接口用户管理添加
            component: resolve => {
              require(['@/views/config/apiManage/apiUserMan/add.vue'], resolve)
            },
          }, {
            path: '/apiManage/apiUserMan/edit',
            name: '接口用户修改',//接口管理-接口用户管理修改
            component: resolve => {
              require(['@/views/config/apiManage/apiUserMan/edit.vue'], resolve)
            },
          }]
        },
        {
          path: '/apiManage/apiUseRecord',
          name: '接口使用记录',//接口管理-接口使用记录
          component: childView,
          redirect: '/apiManage/apiUseRecord/list',
          children: [{
            path: '/apiManage/apiUseRecord/list',
            name: '接口使用列表',//接口管理-接口使用记录列表
            component: resolve => {
              require(['@/views/config/apiManage/apiUseRecord/list.vue'], resolve)
            },
          }]
        },
        {
          path: '/apiManage/apiRecord',
          name: 'api接口记录',//接口管理-api接口记录
          component: childView,
          redirect: '/apiManage/apiRecord/list',
          children: [{
            path: '/apiManage/apiRecord/list',
            name: 'api接口记录列表',//接口管理-api接口记录列表
            component: resolve => {
              require(['@/views/config/apiManage/apiRecord/list.vue'], resolve)
            },
          }]
        },
        {
          path: '/apiManage/apiInfo',
          name: 'api接口管理',//接口管理-接口使用记录
          component: childView,
          redirect: '/apiManage/apiInfo/list',
          children: [{
            path: '/apiManage/apiInfo/list',
            name: 'api接口列表',//接口管理-api接口管理列表
            component: resolve => {
              require(['@/views/config/apiManage/apiInfo/list.vue'], resolve)
            },
          }, {
            path: '/apiManage/apiInfo/add',
            name: 'api接口添加',//接口管理-api接口管理添加
            component: resolve => {
              require(['@/views/config/apiManage/apiInfo/edit.vue'], resolve)
            },
          }, {
            path: '/apiManage/apiInfo/edit',
            name: 'api接口修改',//接口管理-api接口管理修改
            component: resolve => {
              require(['@/views/config/apiManage/apiInfo/edit.vue'], resolve)
            },
          }]
        },
        {
          path: '/apiManage/apiAccount',
          name: 'api接口账户管理',//接口管理-api接口账户管理
          component: childView,
          redirect: '/apiManage/apiAccount/list',
          children: [{
            path: '/apiManage/apiAccount/list',
            name: 'api接口账户列表',//接口管理-api接口账户管理列表
            component: resolve => {
              require(['@/views/config/apiManage/apiAccount/list.vue'], resolve)
            },
          }, {
            path: '/apiManage/apiAccount/add',
            name: 'api接口账户添加',//接口管理-api接口账户管理添加
            component: resolve => {
              require(['@/views/config/apiManage/apiAccount/add.vue'], resolve)
            },
          }, {
            path: '/apiManage/apiAccount/edit',
            name: 'api接口账户查看', //接口管理-api接口账户管理查看
            component: resolve => {
              require(['@/views/config/apiManage/apiAccount/add.vue'], resolve)
            },
          }, {
            path: '/apiManage/apiAccount/update',
            name: '独立密码修改', //接口管理-api接口账户管理查看
            component: resolve => {
              require(['@/views/config/apiManage/apiAccount/update.vue'], resolve)
            },
          }]
        }
      ]
    },
    {
      path: '/smsServer',
      name: '短信服务',//短信服务
      component: childView,
      children: [
        {
          path: '/smsServer/smsServer',
          name: '短信服务管理',//短信服务-短信服务管理
          component: childView,
          redirect: '/smsServer/smsServer/list',
          children: [{
            path: '/smsServer/smsServer/list',
            name: '短信服务列表',//短信服务-短信服务管理列表
            component: resolve => {
              require(['@/views/config/config/smsServer/list.vue'], resolve)
            },
          },
            {
              path: '/smsServer/smsServer/add',
              name: '短信服务添加',//短信服务-短信服务管理添加
              component: resolve => {
                require(['@/views/config/config/smsServer/add.vue'], resolve)
              },
            },
            {
              path: '/smsServer/smsServer/edit',
              name: '短信服务修改',//短信服务-短信服务管理修改
              component: resolve => {
                require(['@/views/config/config/smsServer/edit.vue'], resolve)
              },
            }
          ]
        },
        {
          path: '/smsServer/smsServer/smsRecord',
          name: '短信使用记录',//短信服务-短信使用记录
          component: childView,
          redirect: '/smsServer/smsServer/smsRecord',
          children: [{
            path: '/smsServer/smsServer/smsRecord',
            name: '短信使用记录列表',//短信服务-短信使用记录
            component: resolve => {
              require(['@/views/config/config/smsServer/smsRecord.vue'], resolve)
            },
          }]
        },
      ]
    },
  ]

}
export default configRouter
